package com.jkwindy.demo;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.context.annotation.Bean;

import com.fasterxml.jackson.databind.Module;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.module.SimpleModule;

import ch.qos.logback.classic.pattern.DateConverter;

@SpringBootApplication
public class JkwindyApplication /*implements ApplicationListener<ApplicationReadyEvent>*/ {

	public static void main(String[] args) {
		SpringApplication.run(JkwindyApplication.class, args);
	}

	@Autowired
	private ObjectMapper objectMapper;

	/*@Override
	public void onApplicationEvent(ApplicationReadyEvent applicationReadyEvent) {
		objectMapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
	}*/
	/*
	 * @Bean public Module customModule() { SimpleModule module = new
	 * SimpleModule(); module.addSerializer(Date.class, new
	 * DateConverter.Serialize()); module.addDeserializer(Date.class, new
	 * Dateconverter.Deserialize()); return module; }
	 */
}
